class Student:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def eat(self):
        print(self.name + '在吃饭')

stu1 = Student('张三', 20)
stu2 = Student('李四', 30)


def show():
    print('定义在类之外的，称函数')

# 类外动态添加成员方法
stu1.show = show
stu1.show()
# error: stu2.show()  # 因为stu2并没有绑定show方法
